package com.kylin.dal.entity.user;

import com.kylin.shared.common.entity.BaseEntry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 用户关系变更历史记录项
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年11月07日 21:01
 */
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_user_address", catalog = "db_kylin_artwork")
public final class UserAddressEntry extends BaseEntry implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column private Long id;

    @Column(name = "user_id")
    private Long userId;

    @Column(length = 6) private String postcode;
    @Column(length = 32) private String consignee;
    @Column(length = 12) private String phone;
    @Column(length = 32) private String province;
    @Column(length = 32) private String city;
    @Column(length = 32) private String county;
    @Column(length = 64) private String address;

    @Column(columnDefinition = "BIT")
    private Integer defaulted;

    @Column(columnDefinition = "BIT")
    private Integer removed;

    @Column(name = "created_by")
    private Long createdBy;

    @Column(name = "updated_by")
    private Long updatedBy;

    @Column(name = "removed_by")
    private Long removedBy;

    @Column(name = "created_at")
    private Long createdAt;

    @Column(name = "updated_at")
    private Long updatedAt;

    @Column(name = "removed_at")
    private Long removedAt;
}
